//
//  SZZCTableViewCell.m
//  Vpay
//
//  Created by 伟大大 on 2018/9/20.
//  Copyright © 2018年 丁伟佳. All rights reserved.
//

#import "SZZCTableViewCell.h"

@implementation SZZCTableViewCell {
    NSString *oid;
    NSDictionary *GoodsDic;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        self = [[[NSBundle mainBundle]loadNibNamed:@"SZZCTableViewCell" owner:nil options:nil]lastObject];
    }
    [self.Cash_btn setBackgroundColor:RGBCOLOR(25, 188, 118)];
    [self.YE_btn setBackgroundColor:RGBCOLOR(255, 195, 24)];

    
    return self;
}

- (void)SetCellInfo:(NSMutableDictionary *)dic
{
    SLog(@" 传过来的DIC = %@",dic);
    
//    self.Name_label.text = dic[@"title"];
//    self.Number_label.text = dic[@"desc"];
//
//    self.Type_label.text = dic[@"dateline"];
//    self.Price_label.text = dic[@"re"];
    
    self.Type_label.text = NSLocalizedString(@"VRT", nil);
    self.Currentprice_label.text = NSLocalizedString(@"currentprice", nil);
    
    [self.YE_btn setTitle:NSLocalizedString(@"YEcell", nil) forState:UIControlStateNormal];
    [self.Cash_btn setTitle:NSLocalizedString(@"VRTcell", nil) forState:UIControlStateNormal];


}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)dealloc {
    [_Name_label release];
    [_Number_label release];
    [_Type_label release];
    [_Price_label release];
    [_Cash_btn release];
    [_YE_btn release];
    [_Currentprice_label release];
    [super dealloc];
}
- (IBAction)Cash_btnClik:(UIButton *)sender {
    
    if (_delegate != nil&&[_delegate respondsToSelector:@selector(choseTerm:withid:)]) {
        
        [_delegate choseTerm:sender withid:oid];
        
    }
}

- (IBAction)YE_btnClik:(UIButton *)sender {
    
    if (_delegate != nil&&[_delegate respondsToSelector:@selector(choseTerm:withid:)]) {
        
        [_delegate choseTerm:sender withid:oid];
        
    }
}
@end
